home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / muttrc.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  13.8 KB  |  238 lines

  1. " Vim syntax file
  2. " Language:    Mutt setup files
  3. " Maintainer:    Preben "Peppe" Guldberg (c928400@student.dtu.dk)
  4. " Last change:    Tue Jul 28 17:41:25 1998
  5.  
  6. " This file covers mutt version 0.74 and up (non developer)
  7. " It has been updated for version 0.93i
  8. " Over the time some features have vanished but are still included
  9. " To get a syntax file for your specific version, see
  10. "    http://www.student.dtu.dk/~c928400/vim
  11.  
  12. " Remove any old syntax stuff hanging around
  13. syn clear
  14.  
  15. " Set the keyword characters
  16. set isk=@,48-57,_,-
  17.  
  18. syn match muttrcComment        "^#.*$"
  19. syn match muttrcComment        "[^\\]#.*$"lc=1
  20.  
  21. " Escape sequences (back-tick and pipe goes here too)
  22. syn match muttrcEscape        +\\[#tnr"'Cc]+
  23. syn match muttrcEscape        +[`|]+
  24.  
  25. " The variables takes the following arguments
  26. syn match  muttrcString        "=\s*[^ #"']\+"lc=1 contains=muttrcEscape
  27. syn region muttrcString        start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcCommand
  28. syn region muttrcString        start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcCommand
  29.  
  30. syn match muttrcSpecial        +\(['"]\)!\1+
  31.  
  32. " Numbers and Quadoptions may be surrounded by " or '
  33. syn match muttrcNumber        /=\s*\d\+/lc=1
  34. syn match muttrcNumber        /"=\s*\d\+"/lc=2
  35. syn match muttrcNumber        /'=\s*\d\+'/lc=2
  36. syn match muttrcQuadopt        +=\s*\(ask-\)\=\(yes\|no\)+lc=1
  37. syn match muttrcQuadopt        +"=\s*\(ask-\)\=\(yes\|no\)"+lc=2
  38. syn match muttrcQuadopt        +'=\s*\(ask-\)\=\(yes\|no\)'+lc=2
  39.  
  40. " Now catch some email addresses and headers (purified version from mail.vim)
  41. syn match muttrcEmail        "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
  42. syn match muttrcHeader        "\<\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\)\>:\="
  43. syn match muttrcHeader        "\<\(Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
  44.  
  45. syn match   muttrcKeySpecial    contained +\(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
  46. syn match   muttrcKey        contained "\S\+"            contains=muttrcKeySpecial
  47. syn region  muttrcKey        contained start=+"+ skip=+\\"+ end=+"+    contains=muttrcKeySpecial
  48. syn region  muttrcKey        contained start=+'+ skip=+\\'+ end=+'+    contains=muttrcKeySpecial
  49. syn match   muttrcKeyName    contained "\<f\(\d\|10\)\>"
  50. syn match   muttrcKeyName    contained "\\[trne]"
  51. syn match   muttrcKeyName    contained "\(<BackSpace>\|<Delete>\|<Down>\|<End>\|<Enter>\)"
  52. syn match   muttrcKeyName    contained "\(<Home>\|<Insert>\|<Left>\|<PageDown>\|<PageUp>\)"
  53. syn match   muttrcKeyName    contained "\(<Return>\|<Right>\|<Up>\)"
  54.  
  55. syn keyword muttrcVarBool    contained allow_8bit arrow_cursor ascii_chars askbcc askcc auto_tag
  56. syn keyword muttrcVarBool    contained autoedit beep beep_new check_new confirmappend
  57. syn keyword muttrcVarBool    contained confirmcreate edit_headers fast_reply fcc_attach
  58. syn keyword muttrcVarBool    contained followup_to force_name forward_decode forward_quote hdrs
  59. syn keyword muttrcVarBool    contained header help ignore_list_reply_to mark_old markers
  60. syn keyword muttrcVarBool    contained menu_scroll meta_key metoo mime_forward_decode pager_stop
  61. syn keyword muttrcVarBool    contained pgp_autoencrypt pgp_autosign pgp_encryptself pgp_long_ids
  62. syn keyword muttrcVarBool    contained pgp_replyencrypt pgp_replysign pgp_strict_enc pipe_decode
  63. syn keyword muttrcVarBool    contained pipe_split pop_delete prompt_after read_only resolve
  64. syn keyword muttrcVarBool    contained reverse_alias reverse_name save_address save_empty
  65. syn keyword muttrcVarBool    contained save_name sig_dashes smart_wrap sort_re status_on_top
  66. syn keyword muttrcVarBool    contained strict_threads suspend thorough_search tilde use_8bitmime
  67. syn keyword muttrcVarBool    contained use_domain use_from wait_key wrap_search
  68.  
  69. syn keyword muttrcVarBool    contained noallow_8bit noarrow_cursor noascii_chars noaskbcc noaskcc
  70. syn keyword muttrcVarBool    contained noauto_tag noautoedit nobeep nobeep_new nocheck_new
  71. syn keyword muttrcVarBool    contained noconfirmappend noconfirmcreate noedit_headers
  72. syn keyword muttrcVarBool    contained nofast_reply nofcc_attach nofollowup_to noforce_name
  73. syn keyword muttrcVarBool    contained noforward_decode noforward_quote nohdrs noheader nohelp
  74. syn keyword muttrcVarBool    contained noignore_list_reply_to nomark_old nomarkers nomenu_scroll
  75. syn keyword muttrcVarBool    contained nometa_key nometoo nomime_forward_decode nopager_stop
  76. syn keyword muttrcVarBool    contained nopgp_autoencrypt nopgp_autosign nopgp_encryptself
  77. syn keyword muttrcVarBool    contained nopgp_long_ids nopgp_replyencrypt nopgp_replysign
  78. syn keyword muttrcVarBool    contained nopgp_strict_enc nopipe_decode nopipe_split nopop_delete
  79. syn keyword muttrcVarBool    contained noprompt_after noread_only noresolve noreverse_alias
  80. syn keyword muttrcVarBool    contained noreverse_name nosave_address nosave_empty nosave_name
  81. syn keyword muttrcVarBool    contained nosig_dashes nosmart_wrap nosort_re nostatus_on_top
  82. syn keyword muttrcVarBool    contained nostrict_threads nosuspend nothorough_search notilde
  83. syn keyword muttrcVarBool    contained nouse_8bitmime nouse_domain nouse_from nowait_key
  84. syn keyword muttrcVarBool    contained nowrap_search
  85.  
  86. syn keyword muttrcVarBool    contained invallow_8bit invarrow_cursor invascii_chars invaskbcc
  87. syn keyword muttrcVarBool    contained invaskcc invauto_tag invautoedit invbeep invbeep_new
  88. syn keyword muttrcVarBool    contained invcheck_new invconfirmappend invconfirmcreate
  89. syn keyword muttrcVarBool    contained invedit_headers invfast_reply invfcc_attach invfollowup_to
  90. syn keyword muttrcVarBool    contained invforce_name invforward_decode invforward_quote invhdrs
  91. syn keyword muttrcVarBool    contained invheader invhelp invignore_list_reply_to invmark_old
  92. syn keyword muttrcVarBool    contained invmarkers invmenu_scroll invmeta_key invmetoo
  93. syn keyword muttrcVarBool    contained invmime_forward_decode invpager_stop invpgp_autoencrypt
  94. syn keyword muttrcVarBool    contained invpgp_autosign invpgp_encryptself invpgp_long_ids
  95. syn keyword muttrcVarBool    contained invpgp_replyencrypt invpgp_replysign invpgp_strict_enc
  96. syn keyword muttrcVarBool    contained invpipe_decode invpipe_split invpop_delete invprompt_after
  97. syn keyword muttrcVarBool    contained invread_only invresolve invreverse_alias invreverse_name
  98. syn keyword muttrcVarBool    contained invsave_address invsave_empty invsave_name invsig_dashes
  99. syn keyword muttrcVarBool    contained invsmart_wrap invsort_re invstatus_on_top
  100. syn keyword muttrcVarBool    contained invstrict_threads invsuspend invthorough_search invtilde
  101. syn keyword muttrcVarBool    contained invuse_8bitmime invuse_domain invuse_from invwait_key
  102. syn keyword muttrcVarBool    contained invwrap_search
  103.  
  104. syn keyword muttrcVarQuad    contained abort_nosubject abort_unmodified copy delete include
  105. syn keyword muttrcVarQuad    contained mime_forward move pgp_verify_sig postpone print quit
  106. syn keyword muttrcVarQuad    contained recall reply_to use_mailcap
  107.  
  108. syn keyword muttrcVarQuad    contained noabort_nosubject noabort_unmodified nocopy nodelete
  109. syn keyword muttrcVarQuad    contained noinclude nomime_forward nomove nopgp_verify_sig
  110. syn keyword muttrcVarQuad    contained nopostpone noprint noquit norecall noreply_to
  111. syn keyword muttrcVarQuad    contained nouse_mailcap
  112.  
  113. syn keyword muttrcVarQuad    contained invabort_nosubject invabort_unmodified invcopy invdelete
  114. syn keyword muttrcVarQuad    contained invinclude invmime_forward invmove invpgp_verify_sig
  115. syn keyword muttrcVarQuad    contained invpostpone invprint invquit invrecall invreply_to
  116. syn keyword muttrcVarQuad    contained invuse_mailcap
  117.  
  118. syn keyword muttrcVarNum    contained history imap_checkinterval mail_check pager_context
  119. syn keyword muttrcVarNum    contained pager_index_lines pgp_timeout pop_port read_inc
  120. syn keyword muttrcVarNum    contained sendmail_wait timeout write_inc
  121.  
  122. syn keyword muttrcVarStr    contained alias_file alias_format alternates attribution charset
  123. syn keyword muttrcVarStr    contained date_format default_hook delete_format dsn_notify
  124. syn keyword muttrcVarStr    contained dsn_return edit_hdrs editor escape folder folder_format
  125. syn keyword muttrcVarStr    contained forw_decode forw_format forw_quote forward_format
  126. syn keyword muttrcVarStr    contained hdr_format hostname imap_pass imap_user in_reply_to
  127. syn keyword muttrcVarStr    contained indent_str indent_string index_format ispell locale
  128. syn keyword muttrcVarStr    contained mailcap_path mask mbox mbox_type message_format mime_fwd
  129. syn keyword muttrcVarStr    contained msg_format pager pager_format pgp_default_version
  130. syn keyword muttrcVarStr    contained pgp_default_version pgp_default_version pgp_gpg
  131. syn keyword muttrcVarStr    contained pgp_key_version pgp_receive_version pgp_send_version
  132. syn keyword muttrcVarStr    contained pgp_sign_as pgp_sign_micalg pgp_v2 pgp_v2_language
  133. syn keyword muttrcVarStr    contained pgp_v2_pubring pgp_v2_secring pgp_v5 pgp_v5_language
  134. syn keyword muttrcVarStr    contained pgp_v5_pubring pgp_v5_secring pipe_sep pop_host pop_pass
  135. syn keyword muttrcVarStr    contained pop_user post_indent_str post_indent_string postponed
  136. syn keyword muttrcVarStr    contained print_cmd print_command query_command quote_regexp
  137. syn keyword muttrcVarStr    contained realname record reply_regexp sendmail shell signature
  138. syn keyword muttrcVarStr    contained simple_search sort sort_alias sort_aux sort_browser
  139. syn keyword muttrcVarStr    contained spoolfile status_chars status_format tmpdir to_chars
  140. syn keyword muttrcVarStr    contained visual
  141.  
  142. syn keyword muttrcMenu        contained alias attach browser compose editor generic index pager
  143. syn keyword muttrcMenu        contained pgp
  144.  
  145. syn keyword muttrcCommand    alternative_order auto_view fcc-hook fcc-save-hook folder-hook
  146. syn keyword muttrcCommand    hdr_order ignore lists mailboxes mbox-hook my_hdr push reset
  147. syn keyword muttrcCommand    save-hook score send-hook source toggle unalias uncolor unignore
  148. syn keyword muttrcCommand    unlists unmy_hdr unscore unset
  149.  
  150. syn keyword muttrcSet        set     skipwhite nextgroup=muttrcVar.*
  151. syn keyword muttrcUnset        unset   skipwhite nextgroup=muttrcVar.*
  152.  
  153. syn keyword muttrcBind        contained bind        skipwhite nextgroup=muttrcMenu
  154. syn match   muttrcBindLine    "^\s*bind\s\+\S\+"    skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcBind
  155.  
  156. syn keyword muttrcMacro        contained macro        skipwhite nextgroup=muttrcMenu
  157. syn match   muttrcMacroLine    "^\s*macro\s\+\S\+"    skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcMacro
  158.  
  159. syn keyword muttrcAlias        contained alias
  160. syn match   muttrcAliasLine    "^\s*alias\s\+\S\+" contains=muttrcAlias
  161.  
  162. " Colour definitions takes object, foreground and background arguments (regexps excluded).
  163. syn keyword muttrcColorField    contained attachment body bold error hdrdefault header index
  164. syn keyword muttrcColorField    contained indicator markers message normal quoted search signature
  165. syn keyword muttrcColorField    contained status tilde tree underline
  166. syn match   muttrcColorField    contained "\<quoted\d\=\>"
  167. syn keyword muttrcColorFG    contained black blue cyan default green magenta red white yellow
  168. syn keyword muttrcColorFG    contained brightblue brightcyan brightdefault brightgreen
  169. syn keyword muttrcColorFG    contained brightmagenta brightred brightwhite brightyellow
  170. syn match   muttrcColorFG    contained "\<\(bright\)\=color\d\{1,2}\>"
  171. syn keyword muttrcColorBG    contained black blue cyan default green magenta red white yellow
  172. syn match   muttrcColorBG    contained "\<color\d\{1,2}\>"
  173. " Now for the match
  174. syn keyword muttrcColor        contained color            skipwhite nextgroup=muttrcColorField
  175. syn match   muttrcColorInit    contained "^\s*color\s\+\S\+"    skipwhite nextgroup=muttrcColorFG contains=muttrcColor
  176. syn match   muttrcColorLine    "^\s*color\s\+\S\+\s\+\S"    skipwhite nextgroup=muttrcColorBG contains=muttrcColorInit
  177.  
  178. " Mono are almost like color (ojects inherited from color)
  179. syn keyword muttrcMonoAttrib    contained bold none normal reverse standout underline
  180. syn keyword muttrcMono        contained mono        skipwhite nextgroup=muttrcColorField
  181. syn match   muttrcMonoLine    "^\s*mono\s\+\S\+"    skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
  182.  
  183. " obsolete
  184. syn keyword muttrcKeyName    contained backspace delete down end enter home insert left pagedown
  185. syn keyword muttrcKeyName    contained pageup return right up
  186. syn keyword muttrcVarBool    contained confirmfiles confirmfolders hold no_hdrs pgp_replypgp
  187. syn keyword muttrcVarBool    contained point_new noconfirmfiles noconfirmfolders nohold nono_hdrs
  188. syn keyword muttrcVarBool    contained nopgp_replypgp nopoint_new invconfirmfiles
  189. syn keyword muttrcVarBool    contained invconfirmfolders invhold invno_hdrs invpgp_replypgp
  190. syn keyword muttrcVarBool    contained invpoint_new attach_split edit_hdrs forw_decode forw_quote
  191. syn keyword muttrcVarBool    contained mime_fwd
  192. syn keyword muttrcVarNum    contained references
  193. syn keyword muttrcVarQuad    contained verify_sig
  194. syn keyword muttrcVarStr    contained local_sig local_site pgp pgp_pubring pgp_secring
  195. syn keyword muttrcVarStr    contained pgp_version remote_sig thread_chars url_regexp web_browser
  196. syn keyword muttrcVarStr    contained decode_format pgp_v3 pgp_v3_language pgp_v3_pubring
  197. syn keyword muttrcVarStr    contained pgp_v3_secring sendmail_bounce
  198. syn keyword muttrcMenu        contained url
  199. syn keyword muttrcCommand    alternates localsite unlocalsite
  200.  
  201. if !exists("did_muttrc_syntax_inits")
  202.   let did_muttrc_syntax_inits = 1
  203.   " The default methods for highlighting.  Can be overridden later
  204.   hi link muttrcComment        Comment
  205.   hi link muttrcEscape        SpecialChar
  206.   hi link muttrcString        String
  207.   hi link muttrcSpecial        Special
  208.   hi link muttrcNumber        Number
  209.   hi link muttrcQuadopt        Boolean
  210.   hi link muttrcEmail        Special
  211.   hi link muttrcHeader        Type
  212.   hi link muttrcKeySpecial    SpecialChar
  213.   hi link muttrcKey        Type
  214.   hi link muttrcKeyName        Macro
  215.   hi link muttrcVarBool        Identifier
  216.   hi link muttrcVarQuad        Identifier
  217.   hi link muttrcVarNum        Identifier
  218.   hi link muttrcVarStr        Identifier
  219.   hi link muttrcMenu        Identifier
  220.   hi link muttrcCommand        Keyword
  221.   hi link muttrcSet        muttrcCommand
  222.   hi link muttrcUnset        muttrcCommand
  223.   hi link muttrcBind        muttrcCommand
  224.   hi link muttrcMacro        muttrcCommand
  225.   hi link muttrcAlias        muttrcCommand
  226.   hi link muttrcAliasLine    Identifier
  227.   hi link muttrcColorField    Identifier
  228.   hi link muttrcColorFG        String
  229.   hi link muttrcColorBG        muttrcColorFG
  230.   hi link muttrcColor        muttrcCommand
  231.   hi link muttrcMonoAttrib    muttrcColorFG
  232.   hi link muttrcMono        muttrcCommand
  233. endif
  234.  
  235. let b:current_syntax = "muttrc"
  236.  
  237. "EOF    vim: ts=8 noet tw=100 sw=8 sts=0
  238.